﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="wucResourceUpload.ascx.cs"
    Inherits="Modules_WebsiteBackEnd_wucResourceUpload" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Label ID="lblImageThumbDir" runat="server" Text="" Visible="false"></asp:Label>
<asp:Label ID="lblResourceDir" runat="server" Text="" Visible="false"></asp:Label>
<asp:Label ID="lblNewsType" runat="server" Text="" Visible="false"></asp:Label>
<asp:Label ID="Label1" runat="server" Text="" Visible="false"></asp:Label>
<asp:Label ID="Label2" runat="server" Text="" Visible="false"></asp:Label>
<asp:Label ID="Label3" runat="server" Text="" Visible="false"></asp:Label>
<asp:UpdatePanel ID="UpdatePanel" runat="server">
    <ContentTemplate>
        <table align="center" border="0" cellpadding="0" cellspacing="0" width="700px" height="390px"
            bgcolor="#f4f4f4">
            <tr>
                <td align="center" width="390px" valign="middle" bgcolor="#ffffff">
                    <asp:Image ID="imgThumbViewer" runat="server" AlternateText="" ImageAlign="Middle"
                        ImageUrl="" />
                </td>
                <td width=10px>&nbsp;</td>                
                <td align="center" width="300px" valign=top>
                    <table align="left" border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr height="10px">
                            <td align="left" colspan=2>&nbsp;                           
                            </td>
                        </tr>
                        <tr height="30px">
                            <td align="left" colspan="2" valign=middle>
                                <b>Chọn ảnh đại diện:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b><telerik:RadFormDecorator ID="rfdFormDecorator"
                                    runat="server" Skin="Vista" DecoratedControls="all"></telerik:RadFormDecorator>
                                    <telerik:RadComboBox ID="rcbxThumbSize" runat="server" Width="88px" Skin="Vista">
                                         <Items>
                                                <telerik:RadComboBoxItem Text="300x300" Value="0" />
                                                <telerik:RadComboBoxItem Text="250x250" Value="1" />
                                                <telerik:RadComboBoxItem Text="210x210" Value="2" />
                                                <telerik:RadComboBoxItem Text="144x144" Value="3" />
                                                <telerik:RadComboBoxItem Text="50x50" Value="4" />
                                            </Items>
                                    </telerik:RadComboBox>
                            </td>
                        </tr>
                        <tr height=5px></tr>
                        <tr>
                            <td align="left" valign="top">
                                <telerik:RadUpload ID="rulImage" runat="server" OverwriteExistingFiles="true" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
                                    InitialFileInputsCount="1" MaxFileInputsCount="1" MaxFileSize="20971520"
                                    ControlObjectsVisibility="none" Skin="Vista" Width=150px/>
                            </td>                            
                            <td align="left" valign="top"><asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="btnUpload_Click" /></td>
                        </tr>
                        <tr><td colspan="2" height="70px">&nbsp;</td></tr>    
                    </table>                   
                    <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr height="25px">
                            <td align="center" colspan="2">
                                <telerik:RadRotator ID="rrttrThumbList" runat="server" RotatorType="Buttons" Skin="WebBlue"
                                    Width="300px" Height="130px" FrameDuration="500" ScrollDirection="Left,Right" OnItemClick="ShowImage">
                                    <ItemTemplate>
                                        <table align="center" cellpadding="0" cellspacing="0" width="130px" height="130px"
                                            style="border: 1px solid #DFDFDF;">
                                            <tr>
                                                <td align="center" valign="middle">
                                                    <asp:Image ID="imgThumb" Width="100px" Height="90px" runat="server" AlternateText=""
                                                        ImageAlign="Middle" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ThumbUrl") %>' /></td>
                                            </tr>
                                            <tr>
                                                <td align="center" valign="middle">
                                                    <%# DataBinder.Eval(Container.DataItem, "ThumbName") %>
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>                                    
                                    <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />
                                </telerik:RadRotator>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </ContentTemplate>
    <Triggers>
        <asp:PostBackTrigger ControlID="btnUpload" />
    </Triggers>
</asp:UpdatePanel>
